home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 1.0 KB | 52 lines | [TEXT/ToyS] |
- property kasLoc : {0, 0}
-
- global gasInfo -- Display
-
-
- on run
- set gasInfo to ¬
- display info titled ("Input State V1.0") ¬
- located at kasLoc
- end run
-
-
- on msg(txt, lineNo)
- set newLoc to ¬
- screen location of ¬
- (display info gasInfo message txt at line lineNo using font "Monaco" using size 9)
-
- if (newLoc is not kasLoc) then ¬
- set kasLoc to newLoc
- end msg
-
-
- on idle
- set myState to input state
-
- msg("Conglomerate: " & conglomerate of myState, 1)
- msg("Mouse X : " & item 1 of pointer location of myState, 2)
- msg("Mouse Y : " & item 2 of pointer location of myState, 3)
- msg("Modifiers : " & modifier keys of myState, 4)
- msg("Transient : " & transient keys of myState, 5)
-
- set kc to keys down of myState
-
- msg("Keys : " & kc, 6)
-
- if (kc is not "") then
- set ka to (ASCII number kc)
- msg("ASCII : " & ka, 7)
- msg("ASCII hex : " & (hex convert source value ka), 8)
- end if
-
- return 1
- end idle
-
-
- on quit
- set kasLoc to ¬
- screen location of ¬
- (display info gasInfo with disposal)
- continue quit
- end quit
-